<template>
  <div id="app">
<!--    <el-backtop></el-backtop>-->
    <loading v-show="isLoading"
             class="loading"></loading>
    <transition mode="out-in" name="t1">
      <router-view></router-view>
    </transition>
  </div>
</template>

<script>
import {mapState} from 'vuex'
import Loading from './components/loading.vue'

export default {
  name: 'app',
  components: {
    Loading
  },
  computed: {
    ...mapState(['isLoading'])
  },
}
</script>

<style scoped>

.app {
  width: 100%;
  height: 100%;
  min-width: 1500px;
}

.t1-enter,
.t1-leave-to {
  opacity: 0;
}
.t1-enter-active,
.t1-leave-active {
  transition: all 0.5s;
}

.loading {
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
</style>
